home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / LIB211.ZIP;1 / SCREEN.TXT < prev    next >
Encoding:
Text File  |  1993-12-14  |  8.7 KB  |  243 lines

  1.                     Screen.BIN
  2.  
  3.    Copyright (C) Paul B. Powers, August 18, 1990
  4.  
  5.    When distributing the screen.bin file this text file,
  6. readme.scr is to be distributed along with it.  This software is
  7. being distributed as Freeware and no payment is charged for its
  8. use or distribution.  The author has made every available attempt
  9. to test this piece of software.  However, the author cannot be
  10. held responsible for any damage, loss or other mishaps as a
  11. result of the usage of this software.
  12.  
  13. NOTE: This can be downloaded from the DBASE forum on CompuServe,
  14. Library 4, as SCREEN.ZIP -- this .zip file includes the .ASM source
  15. code.
  16.  
  17. The bin file takes two parameters.  the bin file can be called
  18. with the call command or function - Call or Call() as follows;
  19.  
  20.    load screen
  21.  
  22.    * either *
  23.    call screen with <parameter1>, <parameter2>
  24.    * or     *
  25.    memvar = call("screen","<parameter1>,"<parameter2>")
  26.  
  27.    release module screen
  28.  
  29.    parameter1 has the following option;
  30.    "W" or "w" - which will write the screen characters and
  31.                 attributes to the filename specified in
  32.                 parameter2.  Neither write mode will 
  33.                 overwrite a file.
  34.  
  35.    "W-" or "w-" - which will write only the screen characters
  36.                 to the file spoecified in parameter2. 
  37.                 Neither write mode will overwrite a 
  38.                 file.
  39.  
  40.    "A" or "a" - which will only append the screen characters to
  41.                 the filename specified in parameter2.  
  42.                 The append mode will only concatenate 
  43.                 the characters to the end of the file 
  44.                 specified in parameter2.
  45.  
  46.    "R" or "r" - which will read the file and print it on the
  47.                 screen, whether the bin file prints only
  48.                 characters or both characters and color
  49.                 attributes depends on the size of the 
  50.                 source file to be read (see chart 
  51.                 below). specified by 
  52.    
  53.    parameter 2 is the drive:\path\filename of the file that is
  54.    to be read, written, or appended.
  55.  
  56.  
  57.    You can also use a text editor to make the text file to be
  58. read in.  To do this make sure you use only spaces, don't use any
  59. tabs to fill in blank spaces.  Each row on the screen is expected
  60. to be 81 characters long.  The first 80 characters are expected
  61. to be text characters (i.e. no tabs, use the spacebar to create
  62. blank spaces), on column 81 you are expected to press the enter
  63. key.  If you are in a 25-line mode (Mono, CGA, EGA or VGA) make
  64. sure the text file has 25 lines.  If you are in a 43-line mode
  65. (EGA) or a 50-line mode (VGA) make sure the text file has 43 or
  66. 50 lines in it, respectively.  This file format is designed so
  67. that a text editor will be to read a text file that is created by
  68. screen.bin with the "w-" or the "a" option.  To see the type of
  69. file screen.bin creates creates in general see the diagram below.
  70.  
  71.  
  72.  
  73.  
  74.  
  75. For writing your own text files to use with screen.bin the format
  76. is as follows:
  77.  
  78.          text file
  79. 1                                 80  81
  80. |------------------------------------------------------|<cr>/<lf>
  81. |                                                      |
  82. |                                                      |
  83. |      characters go here                              |
  84. |                                                      |
  85. |                                                      |
  86. |------------------------------------------------------|
  87. |                                                      |
  88. |                                                      |
  89. |      (optional) attributes go here,                  |
  90. |   not used with the "w-" and "a" modes               |
  91. |                                                      |
  92. |------------------------------------------------------|
  93.  
  94. The "r" option will read in and interpret the file as having
  95. characters only or having both characters and color attributes
  96. based on the size of the specified text file.  The interpretation
  97. will be based as follows:
  98.  
  99.  
  100. 25-line mode  4098 bytes: (82 bytes/row) * (25 rows) * 2 (for 
  101.                           and above character and color 
  102.                           attributes). 
  103.                           Why 82 bytes/row instead
  104.                           of 81 is that a text 
  105.                           editor will place two
  106.                           characters (a <cr> and a
  107.                           <lf>) in the file when 
  108.                           the [enter] key is 
  109.                           pressed.  This resultant
  110.                           size will actually work 
  111.                           out to be 4101 bytes.  
  112.                           Three bytes are taken off
  113.                           the file size in case the
  114.                           last <cr>/<lf> and the 
  115.                           end-of-file
  116.                           marker is not added on.
  117.  
  118.          2048 to   : (82 bytes/row) * (25 rows). Only    
  119.                      4097 bytes   characters will be read from      
  120.                      the specified text file.
  121.  
  122.  
  123.  
  124. 43-line mode   7050 bytes: (82 bytes/row) * (43 rows) * 2  Both
  125.                                  and above characters and color 
  126.                                  attributes will be read
  127.                                  from the specified
  128.                                  text file.
  129.  
  130.          3524 to   : (82 bytes/row) * (43 rows).  Only    
  131.                      7049 bytes characters will be read from the    
  132.                      specified text file.
  133.  
  134.  
  135.  
  136. 50-line mode   8198 bytes: (82 bytes/row) * (50 rows) * 2.  Both
  137.                                  and above character and color 
  138.                                  attributes will be read 
  139.                                  from the specified text
  140.                                  file.
  141.  
  142.          4098 to   : (82 bytes/row) * (50 rows).  Only
  143.                       8197 bytes characters will be read from the
  144.                       specified text file.
  145.  
  146.  
  147.  
  148. Since some people have a "beta" version of this bin file a
  149. listing of the changes and fixes have been provided.
  150.  
  151. Version 1.1b - Changes and Fixes.
  152.  
  153. 1. Bug fix regarding reading the color attributes.  Reading in a
  154.    file with color attributes to write to the screen resulted in the
  155.    color attributes being read in, but shifted one column to the left
  156.    on the screen.  The text would appear normal on the screen but it's
  157.    color attribute would appear column to the left of the text.  This
  158.    bug has been fixed.
  159.  
  160. 2. At the DOS-prompt type "type screen.bin" to see the version number-
  161.    thanks goes to Keith Mund for presenting this idea to me.
  162.  
  163.  
  164. Version 1.2 - Changes.
  165.  
  166. 1. Screen.bin can now be called with the call() function, and will
  167.    pass back an error/success code to dBASE IV.  The error codes
  168.    are assigned as follows;
  169.  
  170.    1: Product is not dBASE IV (you should never see this error code,
  171.     let me know if you do).
  172.  
  173.    2: Lines on screen are not set to 25, 43, or 50.
  174.  
  175.    3: First parameter was not a "W","w","R","r","A", or an "a".
  176.  
  177.    4: Unable to open file, the file does not exist, was   previously
  178.     opened or the path was mispelled .
  179.  
  180.    5: File is too small to read, for the current line mode.
  181.  
  182.    6: Unable to position a file pointer for a file read.
  183.  
  184.    7: Error occured during a file read.
  185.  
  186.    8: file already exists (happens with the "W","W-","w" or "w-"
  187.     option).
  188.  
  189.    9: Unable to create the file (happens with the "W","W-","w","w-"
  190.     and the "A" and "a" options).
  191.  
  192.    A: Unable to position a file pointer for a file write.
  193.  
  194.    B: Error occured during a file write.
  195.  
  196.    C: File failed to close.
  197.  
  198. Version 1.2b - Fixes
  199.  
  200. 1. Minor corrective coding change provided to ensure proper
  201. embedding of carriage return/linefeeds and end of file markers in
  202. the output file.
  203.  
  204. Version 1.2c - Changes
  205.  
  206. 1. Just a change in what the copyright says when a "type
  207. screen.bin" writes when executed from a dos-prompt.  Nothing else
  208. has changed.
  209.  
  210.  
  211.  
  212. Further Enhancements:
  213.  
  214.   If you like this piece of software or think it could be
  215. enhanced in a certain fashion please contact him.  Any further
  216. advancement of this bin file will be proportional to it's use AND
  217. the response for enhancement of those who use it.
  218.  
  219. The author can be contacted by E-mail on the Ashton Tate BBS at;
  220.  
  221.    1200 BAUD  (213)538-6196
  222.  
  223.    2400 BAUD  (213)324-2188
  224.  
  225.    or on Compuserv (for free access use this route), 
  226.    at the "Host Name:" prompt type "ATBBS"
  227.    
  228.  
  229.    Please leave E-mail for the user name of Plpowers.
  230.  
  231.  
  232. Special thanks goes to those who were part of the beta-testing on
  233. this bin file, they are;
  234.  
  235. Judy Maske
  236. Dan Madoni
  237. Roger Bowman
  238.  
  239. Thanks very much guys !
  240.  
  241.  
  242. And lastly thank you very much, and enjoy !
  243.